Edas Assembler Commands.
************************
A filespec/cmd,filespec/ref -switch -switch
-------------------------------------------
  filespec/cmd the object file generation.
  filespec/ref the cross reference data file.
  -ci core image object file.
  -im assemble object code into memory.
  -lp generate listing to printer.
  -nc suppress listing of conditional blocks logically FALSE.
  -ne suppression listing of data declaration pseudo-ops.
  -nh suppress writing the header record  to object code file
  -nm suppress listing MACRO expansions.
  -no dummy default in JCL execution of edas.
  -we wait on error if an error occurs.
  -wo assemble with object code generation.
  -ws generate a sorted symbol table listing during assembly.
  -xr generate a cross reference datafile  by xref/cmd.
  Eg. afilename filename/ref -we -ws
B (address)
-----------
  B by itself returns to dos.
  B 9000 will branch to your program in memory.
  B 5806 a warm start vector re-initializes edas.
  B 400F enters debug.
C /string1/string2/nl,n2
------------------------
  string1 the current string to change.
  string2 replacement string for string1.
  n1 line number preceeding first change.
  n2 line number of last line to change.
  / string separator any character except 0-9.
C line1,line2,line3
-------------------
  first line of the block to duplicate.
  last line of the block to duplicate.
  line3 is the line number the block should follow.
D line1,line2 
--------------
  eg d 100,500 or dt,b or d (current line) d 105
E (line) edit line E is current line.
-------------------------------------
  sub command.A abort and restart line edit.
              nC change n characters.
              nD delete n characters.
              E end editing and edit changes.
              H delete and hack remainder and insert string.
              I insert string.
              nKx kill all characters to the nth occurrence.
              L print to rest of line and restart.
              Q quit and ignore all editing.
              nSx search for the nth occurrence of x.
              backspace one character.
              ENTER exit edit mode.
              SHIFT-up-arrow escape edit mode.
              SPACE display next character.
F(string) locate the next occurrence of a string.
------------------------------------------------
H line1,line2 a hard copy or block of lines.
--------------------------------------------
    H #,* or H t,b print from top to bottom.
    H. print current line.
    H prints the 15 lines from current line.
I line#,inc Insert.
-------------------
  line# is the no of the line that the insert should follow.
  inc changes the current increment to "inc".
  use BREAK or SHIFT CLEAR to exit
  e.g I 300,5
  Ib append new text at end.
K filespec kill filespec to be erased.
--------------------------------------
  e.g K oldprog/asm:0 erases it.
L filespec load the filespec (default extension /asm).
-------------------------------
M line1,line2,line3 Move.
-------------------------
  line1 first line .
  line2 last line.
  line3 number of line that block should follow.
  e.g m 500,900,1510.
N line1,inc renumber the lines in text with value inc.
-------------------
  e.g N renumbers all text to 100 increment 10.
      N5 starts text to line 5.
      N10,5 changes line increment to value of 5.
P line1,line2 prints all lines line1 to line2.
-----------------
   eg P #.* or t,b top to bottom
   eg P 100,500 or P. or P is current 15 lines.
Qd/ext Query executes a dos command.
-----------------------
    d is directory number.
    /ext is extension .
R line1,inc replaces a specified text line enter Insert mode
-----------
  using inc as the increment to be used. 
  eg R replace current line R 100,10 or R100.
S switch Case Conversion .
------------------------
T line1,line2 types lines to printer omitting line numbers.
--------------------
U Memory usage here are no parameters.
---------
V filespec.
----------
  eg V filespec (extension /asm).
W + # $ !hh filespec Write contents to disk to a disk file.
---------------------
   filespec o be written.
  + optional switch to write a source file with header records.
  # optional switch to write with line numbers.
  $ terminate line numbers with X'89'.
  !hh specify end of file byte with byte value !! suppress 
  E-O-F Value.
X Extend the area of the text buffer by eliminating the
-------
   assembler.

1n1,n2 display or alter current page formatting.
------
  n1 is the number of lines to print per page.
  n2 is the page lengths in lines.
  eg 1 46 51 printed lines is 46 page length 51.
     1 displays current values.
UP-Arrow scroll up.
Down Arrow scroll down.
F1 SHIFT CLEAR will clear screen.
SHIFT @ will pause.

XREF filespec/REF (LEN=val,PAGE=val,LINES=val,EQU,LIMIT) 
---------------------------------------------------------
     filespec/ref is the reference data file generated by
     -XR switch of edas.
     LEN is the printed line length 80 is the default.
     PAGE is the page size.
     LINES is the lines per page.
     EQU controls the generation of EQUate file.
     LIMIT controls what symbols that are written to the
     equate file.

               Executing Edas
EDAS (mem=val,JCL,ABORT,LC,EXT="ext",Pn=val)
-------------------------------------------
     eg EDAS
        EDAS *
            Mem=val protects high memory.
            JCL is used when running from a job control lang.
            LC when editing LC files.
            EXT="ext" allows another default source file.
            Pn=val n ranges from 1 to 4 for symbol equates.
               Pn sets @@n to true.
               Pn=ddd sets @@n to decimal value ddd.
               Pn=X'hhhh' sets @@n to hexadecimal value hhhh.
            * Reload edas and maintain text buffers.
       EDAS (P1) sets @@1 to true and @@2 @@3 @@4 are false.
                eg  MOD1 equ @@1
                    MOD3 equ @@3
             MOD1 would be true and MOD3 is false.
SYNTAX ......
-------------
     LABELS can contain 2-15  letters(A-Z) decimal digits
     (0-9). @ - ? $ are reserved.
     
     Op Codes correspond to those for the Z-80 assembly 
              language 
    Operands are always one or two values separated by commas
             A value in ( ) specifies indirect addressing.
             they may be   Hexadecimal   1AH,0ABH,0FFH.
                           Decimal       107D, 107, 15384.
                           Octal         166Q,  166O
                           Binary        01101110B
    Comments must begin with a ;
    
    Expessions + addition               ALPHA + BETA
               - subtraction            ALPHA - BETA
               * multiplication         ALPHA * BETA
               / Division               ALPHA / BETA
               .MOD. modulo division    ALPHA .MOD> BETA
               < Shift left or right eg ALPHA < BETA
               .AND. or & Logical bitwise AND
               .OR. or !  LOgical bitwise OR
               .XOR. Logical Exclusive OR
           .NOT. Logical I's complement FALSE EQU .NOT. TRUE
           .NE.  Logical binary not equal ALPHA .NE. BETA
           .EQ.  Logical Binary equal     ALPHA .EQ. BETA
            %    Length of Macro          %#label or %%

Z-80 Status Indicators
----------------------
          7  6  5  4  3  2  1  0
          S  Z  X  H  X P/V N  C
        
           C is the carry flag.       C is set NC not set
           N is the add/subtract flag 
           P/V Parity overflow flag   PE is even PO is odd
           H is the half carry flag
           Z is the zero flag         Z is set NZ not set
           S is the sign flag         M is minus P is plus
           X is not used

Pseudo--Ops 
------------
         DB Data byte equivalents DEFB DEFM DM
         --
            eg DB n,n,'c',s,expression
            n defines the contents of a byte at counter
            to be "n"
            'c' defines contents of one byte of memory
                to be the asc11 representation.
            's' defines n bytes in asc11 values 1-63.
      eg 0000 54   00070   DB  'This',' ','is',' ','a','Test'

       DC  quantity,value
       ------------------
           quantity specifies how many times value is to be
           repeated.
           value is from 0-255
          eg  DC 100,0 sets 100 zero spaces.
              DC 256,'A' sets 256 storage locations as A
      DS nn   reserves nn bytes of memory
      -----
            eg FCB DS 32  a 32 byte region for use as a
                          file control block.
 
      DW nn,'cc',nn
      -------------
         nn defines the contents of a 2 byte word to be the 
            value, "nn"
         'cc' defines the contents of a two byte word to be 
              the characters, 'cc'
          eg   0000  1027  0100 DW  10000,1000,100,10,1
                     E803  6400 0A00 0100
          or   000A  6261  00110 DW  'ab'
          or   000C  5200  00120 DW  'R','o','y'
                     6F00  7900
     
     DEFL assigns a value to a label.
     ----------
          label DEFL nn
          label DEFL expression
                   nn sets the value of label to be quan "nn"
                  expression sets value of label as evaluated
                  expression
        eg. PROG$  DEFL  $      ;save current program counter

    END nn or label 
 --------------------
        nn specifies an execution transfer address
        label specifies an execution transfer address
   EQU
   LORG
   ORG
   
Conditional Pseudo ops
   IFxx
   block...
   ENDIF
   
   COM <string> is the information placed as a comment
   ERR is an optional message to inform whats wrong.
  
   mname MACRO #parms1=dflt1,#parms2=dflt2,...
   --------------------------------------
         where mname  is the macro name used
               dflt1 are the optional default to be used for
               the dummy parameters.
          eg mname  MACRO  Parms
                    model statements
                    ENDM
       ENDM  ends the macro.
 Listing Pseudo-ops to control assembler listings.
 ------------------
       Four available are, 
       PAGE (OFF) 
       SPACE N
       SUBTTL  (string)
       TITLE   (string)
       OFF  optional for PAGE
       N  How many lines to generate
       (string) title or sub-title in listings
Assembler Directives
--------------------
      *GET file causes reading of file (file)
      *LIST  OFF suspends listing
      *LIST  ON  resumes listing
      *MOD exp   advances the module char. substitution 
      *PREFIX exp  establishes or disengages  for MACRO subs
      *SEARCH lib  invokes search of PDS (not newdos) for lib

String comparisons
------------------
      IFLT$   string1,string1   TRUE if string1<string2
      IFEQ$   string1,string2   TRUE if string1=string2
      IFGT$   string1,string2   TRUE if string1>string2
      IFNE$   string1,string2   TRUE if string1<>string2

eg.    IFNE$    #TO,(DE)
       LD       DE,#TO
       ENDIF
Testing String lengths.
-----------------------
     % is the length of string 
    eg.     LD    B,%#param    ;loads B with the length
            IFGT  %#param1,6   ;restricts param1 to length 1-6             ERR   Parm too long!
            ENDIF
           IFLT  %%,4         ;<Macro requires 4 actual param
           ERR    Missing required parameters
           ENDIF
    %% is the no of parameters
                                                                                                                                                            